package com.jimikongjian.models;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;

import java.sql.Timestamp;

/**
 * Created by fuxiuyang on 17/2/19.
 */
@Scope("prototype")
@Repository("room")
public class Room {

    /**
     * 初始化id号，将id号置为-1
     */
    public static final int INIT_ID = -1;

    /**
     * 表示是个人空间，只有个人才能拥有
     */
    public static final int TYPE_MY_ROOM = -1;

    /**
     * 表示是公共空间，所有人都可以访问
     */
    public static final int TYPE_PUBLIC_ROOM = 0;

    /**
     * 表示是私有空间，只有有权限的人才可以访问
     */
    public static final int TYPE_PRIVATE_ROOM = 1;

    /**
     * 自身id
     */
    private int id;

    /**
     * 空间名
     */
    private String name;

    /**
     * 空间封面
     */
    private String cover;

    /**
     * 创建人的id号
     */
    private int creatorId = Room.INIT_ID;

    /**
     * 创建人的邮箱
     */
    private String creatorEmail;

    /**
     * 创建人昵称
     */
    private String creatorNick;

    /**
     * 空间的个性签名
     */
    private String signature = "他太懒了，什么也没有留下。";

    /**
     * 空间类型
     * -1：表示是个人空间，只有个人才能拥有
     * 0：表示是公有
     * 1：表示是私有
     */
    private int type = Room.TYPE_PUBLIC_ROOM;

    /**
     * 空间标签
     */
    private String tags;

    /**
     * 空间人数
     */
    private int peoples = 0;

    /**
     * 创建时间
     */
    private Timestamp createTime;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCover() {
        return cover;
    }

    public void setCover(String cover) {
        this.cover = cover;
    }

    public int getCreatorId() {
        return creatorId;
    }

    public void setCreatorId(int creatorId) {
        this.creatorId = creatorId;
    }

    public String getCreatorEmail() {
        return creatorEmail;
    }

    public void setCreatorEmail(String creatorEmail) {
        this.creatorEmail = creatorEmail;
    }

    public String getCreatorNick() {
        return creatorNick;
    }

    public void setCreatorNick(String creatorNick) {
        this.creatorNick = creatorNick;
    }

    public String getSignature() {
        return signature;
    }

    public void setSignature(String signature) {
        this.signature = signature;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public int getPeoples() {
        return peoples;
    }

    public void setPeoples(int peoples) {
        this.peoples = peoples;
    }

    public Timestamp getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
}
